class GoodsModelEntity {
  List<GoodsModelData> data;
  int code;
  String msg;

  GoodsModelEntity({this.data, this.code, this.msg});
  GoodsModelEntity.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = new List<GoodsModelData>();
      (json['data']['list'] as List).forEach((v) {
        data.add(new GoodsModelData.fromJson(v));
      });
    }
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list'] = this.data.map((v) => v.toJson()).toList();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class GoodsModelData {
  String goods_id; //商品ID
  String cat_id; //商品分类ID
  String goods_name; //商品编码/订货号
  String goods_code; //商品编码
  String img; //商品图片/主图/封面图
  String tmp_img; //	商品图片缩虐图
  String video; //商品介绍视频（本地）
  String video_url; //商品介绍视频地址（第三方）
  String description; //	简介
  String brand_id; //品牌ID
  String clicknum; //浏览量
  String old_price; //	参考价
  String price; //	实际价格
  String commission_rate; //	佣金比例，百分比
  String commission; //佣金
  String inventory; //	库存
  String give_point; //赠送积分
  String deduction_point; //	可抵扣积分
  String sales_volume; //销量
  String create_time; //创建时间
  String lable;
  GoodsModelData({
    this.lable,
    this.goods_id, //商品ID
    this.cat_id, //商品分类ID
    this.goods_name, //商品编码/订货号
    this.goods_code, //商品编码
    this.img, //商品图片/主图/封面图
    this.tmp_img, //	商品图片缩虐图
    this.video, //商品介绍视频（本地）
    this.video_url, //商品介绍视频地址（第三方）
    this.description, //	简介
    this.brand_id, //品牌ID
    this.clicknum, //浏览量
    this.old_price, //	参考价
    this.price, //	实际价格
    this.commission_rate, //	佣金比例，百分比
    this.commission, //佣金
    this.inventory, //	库存
    this.give_point, //赠送积分
    this.deduction_point, //	可抵扣积分
    this.sales_volume, //销量
    this.create_time, //创建时间
  });

  GoodsModelData.fromJson(Map<String, dynamic> json) {
    lable = json['lable'].toString();
    goods_id = json['goods_id'].toString(); //商品ID
    cat_id = json['cat_id'].toString(); //商品分类ID
    goods_name = json['goods_name'].toString(); //商品编码/订货号
    goods_code = json['goods_code'].toString(); //商品编码
    img = json['img'].toString(); //商品图片/主图/封面图
    tmp_img = json['tmp_img'].toString(); // 商品图片缩虐图
    video = json['video'].toString(); //商品介绍视频（本地）
    video_url = json['video_url'].toString(); //商品介绍视频地址（第三方）
    description = json['description'].toString(); // 简介
    brand_id = json['brand_id'].toString(); //品牌ID
    clicknum = json['clicknum'].toString(); //浏览量
    old_price = json['old_price'].toString(); // 参考价
    price = json['price'].toString(); // 实际价格
    commission_rate = json['commission_rate'].toString(); // 佣金比例，百分比
    commission = json['commission'].toString(); //佣金
    inventory = json['inventory'].toString(); // 库存
    give_point = json['give_point'].toString(); //赠送积分
    deduction_point = json['deduction_point'].toString(); // 可抵扣积分
    sales_volume = json['sales_volume'].toString(); //销量
    create_time = json['create_time'].toString();

//		desc = json['desc'];
//		order = json['order'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();

    data['lable'] = this.lable; //商品ID
    data['goods_id'] = this.goods_id; //商品ID
    data['cat_id'] = this.cat_id; //商品分类ID
    data['goods_name'] = this.goods_name; //商品编码/订货号
    data['goods_code'] = this.goods_code; //商品编码
    data['img'] = this.img; //商品图片/主图/封面图
    data['tmp_img'] = this.tmp_img; // 商品图片缩虐图
    data['video'] = this.video; //商品介绍视频（本地）
    data['video_url'] = this.video_url; //商品介绍视频地址（第三方）
    data['description'] = this.description; // 简介
    data['brand_id '] = this.brand_id; //品牌ID
    data['clicknum'] = this.clicknum; //浏览量
    data['old_price'] = this.old_price; // 参考价
    data['price'] = this.price; // 实际价格
    data['commission_rate'] = this.commission_rate; // 佣金比例，百分比
    data['commission'] = this.commission; //佣金
    data['inventory'] = this.inventory; // 库存
    data['give_point'] = this.give_point; //赠送积分
    data['deduction_point'] = this.deduction_point; // 可抵扣积分
    data['sales_volume'] = this.sales_volume; //销量
    data['create_time'] = this.create_time; //创建时间
    return data;
  }
}
